﻿using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using SelfService.Model.Interface;
using SelfService.XiaoEn.Models;

namespace SelfService.XiaoEn
{
    public static class XiaoEnServiceExtension
    {
        public static void AddXiaoEnPayService(this IServiceCollection services, IConfiguration configRoot)
        {
            //注入配置文件
            services.Configure<AppSettings>(configRoot.GetSection("AppSettings"));
            //聚合支付
            services.AddScoped<IPaySystem, XiaoEnPay>();
        }
    }
}
